﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Miao.ML
{
    public class GenericMulticastMethodData : MulticastMethodData, IGeneric, IQualifiedName
    {
        public string qualifiedName { get; set; }

        internal readonly List<IGeneric> genericArgumentList = new List<IGeneric>();

        public virtual bool isGenericType => genericArgumentList.Count > 0;

        public int genericArgumentCount => genericArgumentList.Count;

        public string openTypeName { get; set; }

        public IEnumerable<IGeneric> genericArguments => genericArgumentList;

        public IGeneric GetGenericArgument(int index)
        {
            return genericArgumentList[index];
        }

        public void AddGenericArgument(IGeneric generic)
        {
            genericArgumentList.Add(generic);
        }
    }
}

